package com.kaoker.system.dao.impl;

import java.util.List;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import com.kaoker.system.dao.IExerciseDao;
import com.kaoker.system.entity.ExamPoint;
import com.kaoker.system.entity.Exercise;
import com.kaoker.system.entity.KeyNotePoint;

public class ExerciseDao extends HibernateDaoSupport implements IExerciseDao {

	@Override
	public void addExercise(Exercise exercise) {
		this.getHibernateTemplate().save(exercise);
	}

	@Override
	public void deleteExercise(Exercise exercise) {
		this.getHibernateTemplate().delete(exercise);
	}

	@Override
	public Exercise getExercise(Long id) {
		return this.getHibernateTemplate().load(Exercise.class, id);
	}

	//@Override
	public List<KeyNotePoint> getReferKeyNotePoints(Exercise exercise) {
		// TODO Auto-generated method stub
		return null;
	}

	//@Override
	public List<ExamPoint> getReferExamPoints(Exercise exercise) {
		// TODO Auto-generated method stub
		return null;
	}

	//@Override
	public List<Exercise> getReferExercises(Exercise exercise) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void updateExercise(Exercise exercise) {
		 this.getHibernateTemplate().update(exercise);
	}

}
